/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.eng.scc.core.data;

import java.sql.Date;

/**
 *
 * @author Rafael
 */
public class Freight extends Skeleton
{
    private int vehicleId;
    private int driverId;
    private Date departureDate;
    private Date arrivalDate;
    private double comission;
    private String initKm = "";
    private String endKm = "";
    private double fuelPrevision;
    private short state;
    private double totalFillings;

    public double getTotalFillings()
    {
        return totalFillings;
    }

    public void setTotalFillings( double totalFillings )
    {
        this.totalFillings = totalFillings;
    }
    
    public int getVehicleId()
    {
        return vehicleId;
    }

    public void setVehicleId( int vehicleId )
    {
        this.vehicleId = vehicleId;
    }

    public int getDriverId()
    {
        return driverId;
    }

    public void setDriverId( int driverId )
    {
        this.driverId = driverId;
    }

    public Date getDepartureDate()
    {
        return departureDate;
    }

    public void setDepartureDate( Date departureDate )
    {
        this.departureDate = departureDate;
    }

    public Date getArrivalDate()
    {
        return arrivalDate;
    }

    public void setArrivalDate( Date arrivalDate )
    {
        this.arrivalDate = arrivalDate;
    }

    public double getComission()
    {
        return comission;
    }

    public void setComission( double comission )
    {
        this.comission = comission;
    }

    public String getInitKm()
    {
        return initKm;
    }

    public void setInitKm( String initKm )
    {
        this.initKm = initKm;
    }

    public String getEndKm()
    {
        return endKm;
    }

    public void setEndKm( String endKm )
    {
        this.endKm = endKm;
    }

    public double getFuelPrevision()
    {
        return fuelPrevision;
    }

    public void setFuelPrevision( double fuelPrevision )
    {
        this.fuelPrevision = fuelPrevision;
    }

    public short getState()
    {
        return state;
    }

    public void setState( short state )
    {
        this.state = state;
    }

    @Override
    public String toString()
    {
        return "Vehicle: " + vehicleId + " Driver: " + driverId;
    }
    
    @Override
    public boolean equals( Object obj )
    {
        if ( obj == null )
        {
            return false;
        }
        if ( getClass() != obj.getClass() )
        {
            return false;
        }
        final Freight other = ( Freight ) obj;
        if ( this.getId() != other.getId() )
        {
            return false;
        }
        return true;
    }
}
